export function modularColor(row) {
  const { modular } = row
  let type
  let modularStyle
  switch (modular) {
    case 'MEDIA': //媒体报道
      type = ''
      break
    case 'ARTICLE': //学员故事
      type = 'warning'
      break
    case 'ART_ROAD': //艺路鹏游
      modularStyle = `background-color: rgba(194, 128, 255, 0.3);color: #6300bf;border-color: rgba(194, 128, 255, 0.1);`
      break
    case 'TEACHER_TALK': //名师talk
      type = 'danger'
      break
    case 'NEW_PRODUCT': //新品发布
      modularStyle = `background-color: #f0f9eb;color: #67c23a;border-color: #e1f3d8;`
      break
  }
  return [type, modularStyle]
}
export function disabledEdit(row) {
  const { status, createdTime, modular } = row
  const date = Date.parse(new Date(createdTime))
  if (
    (date > 1663817400000 && status === 'CLOSE') ||
    (status === 'CLOSE' && modular === 'MEDIA')
  )
    return false
  else return true
}
